package com.sky.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Mapper
public interface ReportMapper {
    /**
     * 根据日期查询营业额
     * @param date
     * @return
     */
    @Select("select sum(amount) from orders where status = #{status} and order_time like concat(#{date}, '%')")
    String getTurnoverByDateAndStatus(LocalDate date, int status);
}
